3.6.100 \(\int \cot ^6(c+d x) \csc ^3(c+d x) (a+a \sin (c+d x))^2 \, dx\) [600]

3.6.100.1 Optimal result
3.6.100.2 Mathematica [B] (verified)
3.6.100.3 Rubi [A] (verified)
3.6.100.4 Maple [A] (verified)
3.6.100.5 Fricas [A] (verification not implemented)
3.6.100.6 Sympy [F(-1)]
3.6.100.7 Maxima [A] (verification not implemented)
3.6.100.8 Giac [A] (verification not implemented)
3.6.100.9 Mupad [B] (verification not implemented)

3.6.100.1 Optimal result

Integrand size = 29, antiderivative size = 182 \[ \int \cot ^6(c+d x) \csc ^3(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {45 a^2 \text {arctanh}(\cos (c+d x))}{128 d}-\frac {2 a^2 \cot ^7(c+d x)}{7 d}-\frac {35 a^2 \cot (c+d x) \csc (c+d x)}{128 d}+\frac {5 a^2 \cot ^3(c+d x) \csc (c+d x)}{24 d}-\frac {a^2 \cot ^5(c+d x) \csc (c+d x)}{6 d}-\frac {5 a^2 \cot (c+d x) \csc ^3(c+d x)}{64 d}+\frac {5 a^2 \cot ^3(c+d x) \csc ^3(c+d x)}{48 d}-\frac {a^2 \cot ^5(c+d x) \csc ^3(c+d x)}{8 d} \]

output
45/128*a^2*arctanh(cos(d*x+c))/d-2/7*a^2*cot(d*x+c)^7/d-35/128*a^2*cot(d*x 
+c)*csc(d*x+c)/d+5/24*a^2*cot(d*x+c)^3*csc(d*x+c)/d-1/6*a^2*cot(d*x+c)^5*c 
sc(d*x+c)/d-5/64*a^2*cot(d*x+c)*csc(d*x+c)^3/d+5/48*a^2*cot(d*x+c)^3*csc(d 
*x+c)^3/d-1/8*a^2*cot(d*x+c)^5*csc(d*x+c)^3/d
 
3.6.100.2 Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(401\) vs. \(2(182)=364\).

Time = 0.29 (sec) , antiderivative size = 401, normalized size of antiderivative = 2.20 \[ \int \cot ^6(c+d x) \csc ^3(c+d x) (a+a \sin (c+d x))^2 \, dx=a^2 \left (\frac {\cot \left (\frac {1}{2} (c+d x)\right )}{7 d}-\frac {83 \csc ^2\left (\frac {1}{2} (c+d x)\right )}{512 d}-\frac {19 \cot \left (\frac {1}{2} (c+d x)\right ) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{224 d}+\frac {17 \csc ^4\left (\frac {1}{2} (c+d x)\right )}{1024 d}+\frac {5 \cot \left (\frac {1}{2} (c+d x)\right ) \csc ^4\left (\frac {1}{2} (c+d x)\right )}{224 d}+\frac {\csc ^6\left (\frac {1}{2} (c+d x)\right )}{512 d}-\frac {\cot \left (\frac {1}{2} (c+d x)\right ) \csc ^6\left (\frac {1}{2} (c+d x)\right )}{448 d}-\frac {\csc ^8\left (\frac {1}{2} (c+d x)\right )}{2048 d}+\frac {45 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{128 d}-\frac {45 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{128 d}+\frac {83 \sec ^2\left (\frac {1}{2} (c+d x)\right )}{512 d}-\frac {17 \sec ^4\left (\frac {1}{2} (c+d x)\right )}{1024 d}-\frac {\sec ^6\left (\frac {1}{2} (c+d x)\right )}{512 d}+\frac {\sec ^8\left (\frac {1}{2} (c+d x)\right )}{2048 d}-\frac {\tan \left (\frac {1}{2} (c+d x)\right )}{7 d}+\frac {19 \sec ^2\left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right )}{224 d}-\frac {5 \sec ^4\left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right )}{224 d}+\frac {\sec ^6\left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right )}{448 d}\right ) \]

input
Integrate[Cot[c + d*x]^6*Csc[c + d*x]^3*(a + a*Sin[c + d*x])^2,x]
 
output
a^2*(Cot[(c + d*x)/2]/(7*d) - (83*Csc[(c + d*x)/2]^2)/(512*d) - (19*Cot[(c 
 + d*x)/2]*Csc[(c + d*x)/2]^2)/(224*d) + (17*Csc[(c + d*x)/2]^4)/(1024*d) 
+ (5*Cot[(c + d*x)/2]*Csc[(c + d*x)/2]^4)/(224*d) + Csc[(c + d*x)/2]^6/(51 
2*d) - (Cot[(c + d*x)/2]*Csc[(c + d*x)/2]^6)/(448*d) - Csc[(c + d*x)/2]^8/ 
(2048*d) + (45*Log[Cos[(c + d*x)/2]])/(128*d) - (45*Log[Sin[(c + d*x)/2]]) 
/(128*d) + (83*Sec[(c + d*x)/2]^2)/(512*d) - (17*Sec[(c + d*x)/2]^4)/(1024 
*d) - Sec[(c + d*x)/2]^6/(512*d) + Sec[(c + d*x)/2]^8/(2048*d) - Tan[(c + 
d*x)/2]/(7*d) + (19*Sec[(c + d*x)/2]^2*Tan[(c + d*x)/2])/(224*d) - (5*Sec[ 
(c + d*x)/2]^4*Tan[(c + d*x)/2])/(224*d) + (Sec[(c + d*x)/2]^6*Tan[(c + d* 
x)/2])/(448*d))
 
3.6.100.3 Rubi [A] (verified)

Time = 0.50 (sec) , antiderivative size = 182, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {3042, 3352, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \cot ^6(c+d x) \csc ^3(c+d x) (a \sin (c+d x)+a)^2 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\cos (c+d x)^6 (a \sin (c+d x)+a)^2}{\sin (c+d x)^9}dx\)

\(\Big \downarrow \) 3352

\(\displaystyle \int \left (a^2 \cot ^6(c+d x) \csc ^3(c+d x)+2 a^2 \cot ^6(c+d x) \csc ^2(c+d x)+a^2 \cot ^6(c+d x) \csc (c+d x)\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {45 a^2 \text {arctanh}(\cos (c+d x))}{128 d}-\frac {2 a^2 \cot ^7(c+d x)}{7 d}-\frac {a^2 \cot ^5(c+d x) \csc ^3(c+d x)}{8 d}-\frac {a^2 \cot ^5(c+d x) \csc (c+d x)}{6 d}+\frac {5 a^2 \cot ^3(c+d x) \csc ^3(c+d x)}{48 d}+\frac {5 a^2 \cot ^3(c+d x) \csc (c+d x)}{24 d}-\frac {5 a^2 \cot (c+d x) \csc ^3(c+d x)}{64 d}-\frac {35 a^2 \cot (c+d x) \csc (c+d x)}{128 d}\)

input
Int[Cot[c + d*x]^6*Csc[c + d*x]^3*(a + a*Sin[c + d*x])^2,x]
 
output
(45*a^2*ArcTanh[Cos[c + d*x]])/(128*d) - (2*a^2*Cot[c + d*x]^7)/(7*d) - (3 
5*a^2*Cot[c + d*x]*Csc[c + d*x])/(128*d) + (5*a^2*Cot[c + d*x]^3*Csc[c + d 
*x])/(24*d) - (a^2*Cot[c + d*x]^5*Csc[c + d*x])/(6*d) - (5*a^2*Cot[c + d*x 
]*Csc[c + d*x]^3)/(64*d) + (5*a^2*Cot[c + d*x]^3*Csc[c + d*x]^3)/(48*d) - 
(a^2*Cot[c + d*x]^5*Csc[c + d*x]^3)/(8*d)
 

3.6.100.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3352
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n 
_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Int[ExpandTrig 
[(g*cos[e + f*x])^p, (d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m, x], x] /; F 
reeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]
 
3.6.100.4 Maple [A] (verified)

Time = 0.34 (sec) , antiderivative size = 210, normalized size of antiderivative = 1.15

method result size
parallelrisch \(\frac {\left (\tan ^{16}\left (\frac {d x}{2}+\frac {c}{2}\right )+\frac {32 \left (\tan ^{15}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{7}-32 \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-40 \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+96 \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+256 \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-160 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-720 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+160 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-256 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-96 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+40 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+32 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {32 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{7}-1\right ) a^{2}}{2048 d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}\) \(210\)
risch \(\frac {a^{2} \left (581 \,{\mathrm e}^{15 i \left (d x +c \right )}-2065 \,{\mathrm e}^{13 i \left (d x +c \right )}+8960 i {\mathrm e}^{10 i \left (d x +c \right )}+21 \,{\mathrm e}^{11 i \left (d x +c \right )}+1792 i {\mathrm e}^{14 i \left (d x +c \right )}-5705 \,{\mathrm e}^{9 i \left (d x +c \right )}-5376 i {\mathrm e}^{4 i \left (d x +c \right )}-5705 \,{\mathrm e}^{7 i \left (d x +c \right )}-8960 i {\mathrm e}^{8 i \left (d x +c \right )}+21 \,{\mathrm e}^{5 i \left (d x +c \right )}+256 i {\mathrm e}^{2 i \left (d x +c \right )}-2065 \,{\mathrm e}^{3 i \left (d x +c \right )}+5376 i {\mathrm e}^{6 i \left (d x +c \right )}+581 \,{\mathrm e}^{i \left (d x +c \right )}-1792 i {\mathrm e}^{12 i \left (d x +c \right )}-256 i\right )}{448 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{8}}+\frac {45 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{128 d}-\frac {45 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{128 d}\) \(238\)
derivativedivides \(\frac {a^{2} \left (-\frac {\cos ^{7}\left (d x +c \right )}{6 \sin \left (d x +c \right )^{6}}+\frac {\cos ^{7}\left (d x +c \right )}{24 \sin \left (d x +c \right )^{4}}-\frac {\cos ^{7}\left (d x +c \right )}{16 \sin \left (d x +c \right )^{2}}-\frac {\left (\cos ^{5}\left (d x +c \right )\right )}{16}-\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{48}-\frac {5 \cos \left (d x +c \right )}{16}-\frac {5 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{16}\right )-\frac {2 a^{2} \left (\cos ^{7}\left (d x +c \right )\right )}{7 \sin \left (d x +c \right )^{7}}+a^{2} \left (-\frac {\cos ^{7}\left (d x +c \right )}{8 \sin \left (d x +c \right )^{8}}-\frac {\cos ^{7}\left (d x +c \right )}{48 \sin \left (d x +c \right )^{6}}+\frac {\cos ^{7}\left (d x +c \right )}{192 \sin \left (d x +c \right )^{4}}-\frac {\cos ^{7}\left (d x +c \right )}{128 \sin \left (d x +c \right )^{2}}-\frac {\left (\cos ^{5}\left (d x +c \right )\right )}{128}-\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{384}-\frac {5 \cos \left (d x +c \right )}{128}-\frac {5 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{128}\right )}{d}\) \(255\)
default \(\frac {a^{2} \left (-\frac {\cos ^{7}\left (d x +c \right )}{6 \sin \left (d x +c \right )^{6}}+\frac {\cos ^{7}\left (d x +c \right )}{24 \sin \left (d x +c \right )^{4}}-\frac {\cos ^{7}\left (d x +c \right )}{16 \sin \left (d x +c \right )^{2}}-\frac {\left (\cos ^{5}\left (d x +c \right )\right )}{16}-\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{48}-\frac {5 \cos \left (d x +c \right )}{16}-\frac {5 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{16}\right )-\frac {2 a^{2} \left (\cos ^{7}\left (d x +c \right )\right )}{7 \sin \left (d x +c \right )^{7}}+a^{2} \left (-\frac {\cos ^{7}\left (d x +c \right )}{8 \sin \left (d x +c \right )^{8}}-\frac {\cos ^{7}\left (d x +c \right )}{48 \sin \left (d x +c \right )^{6}}+\frac {\cos ^{7}\left (d x +c \right )}{192 \sin \left (d x +c \right )^{4}}-\frac {\cos ^{7}\left (d x +c \right )}{128 \sin \left (d x +c \right )^{2}}-\frac {\left (\cos ^{5}\left (d x +c \right )\right )}{128}-\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{384}-\frac {5 \cos \left (d x +c \right )}{128}-\frac {5 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{128}\right )}{d}\) \(255\)

input
int(cos(d*x+c)^6*csc(d*x+c)^9*(a+a*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
 
output
1/2048*(tan(1/2*d*x+1/2*c)^16+32/7*tan(1/2*d*x+1/2*c)^15-32*tan(1/2*d*x+1/ 
2*c)^13-40*tan(1/2*d*x+1/2*c)^12+96*tan(1/2*d*x+1/2*c)^11+256*tan(1/2*d*x+ 
1/2*c)^10-160*tan(1/2*d*x+1/2*c)^9-720*ln(tan(1/2*d*x+1/2*c))*tan(1/2*d*x+ 
1/2*c)^8+160*tan(1/2*d*x+1/2*c)^7-256*tan(1/2*d*x+1/2*c)^6-96*tan(1/2*d*x+ 
1/2*c)^5+40*tan(1/2*d*x+1/2*c)^4+32*tan(1/2*d*x+1/2*c)^3-32/7*tan(1/2*d*x+ 
1/2*c)-1)*a^2/d/tan(1/2*d*x+1/2*c)^8
 
3.6.100.5 Fricas [A] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 255, normalized size of antiderivative = 1.40 \[ \int \cot ^6(c+d x) \csc ^3(c+d x) (a+a \sin (c+d x))^2 \, dx=-\frac {512 \, a^{2} \cos \left (d x + c\right )^{7} \sin \left (d x + c\right ) - 1162 \, a^{2} \cos \left (d x + c\right )^{7} + 3066 \, a^{2} \cos \left (d x + c\right )^{5} - 2310 \, a^{2} \cos \left (d x + c\right )^{3} + 630 \, a^{2} \cos \left (d x + c\right ) - 315 \, {\left (a^{2} \cos \left (d x + c\right )^{8} - 4 \, a^{2} \cos \left (d x + c\right )^{6} + 6 \, a^{2} \cos \left (d x + c\right )^{4} - 4 \, a^{2} \cos \left (d x + c\right )^{2} + a^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 315 \, {\left (a^{2} \cos \left (d x + c\right )^{8} - 4 \, a^{2} \cos \left (d x + c\right )^{6} + 6 \, a^{2} \cos \left (d x + c\right )^{4} - 4 \, a^{2} \cos \left (d x + c\right )^{2} + a^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{1792 \, {\left (d \cos \left (d x + c\right )^{8} - 4 \, d \cos \left (d x + c\right )^{6} + 6 \, d \cos \left (d x + c\right )^{4} - 4 \, d \cos \left (d x + c\right )^{2} + d\right )}} \]

input
integrate(cos(d*x+c)^6*csc(d*x+c)^9*(a+a*sin(d*x+c))^2,x, algorithm="frica 
s")
 
output
-1/1792*(512*a^2*cos(d*x + c)^7*sin(d*x + c) - 1162*a^2*cos(d*x + c)^7 + 3 
066*a^2*cos(d*x + c)^5 - 2310*a^2*cos(d*x + c)^3 + 630*a^2*cos(d*x + c) - 
315*(a^2*cos(d*x + c)^8 - 4*a^2*cos(d*x + c)^6 + 6*a^2*cos(d*x + c)^4 - 4* 
a^2*cos(d*x + c)^2 + a^2)*log(1/2*cos(d*x + c) + 1/2) + 315*(a^2*cos(d*x + 
 c)^8 - 4*a^2*cos(d*x + c)^6 + 6*a^2*cos(d*x + c)^4 - 4*a^2*cos(d*x + c)^2 
 + a^2)*log(-1/2*cos(d*x + c) + 1/2))/(d*cos(d*x + c)^8 - 4*d*cos(d*x + c) 
^6 + 6*d*cos(d*x + c)^4 - 4*d*cos(d*x + c)^2 + d)
 
3.6.100.6 Sympy [F(-1)]

Timed out. \[ \int \cot ^6(c+d x) \csc ^3(c+d x) (a+a \sin (c+d x))^2 \, dx=\text {Timed out} \]

input
integrate(cos(d*x+c)**6*csc(d*x+c)**9*(a+a*sin(d*x+c))**2,x)
 
output
Timed out
 
3.6.100.7 Maxima [A] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 221, normalized size of antiderivative = 1.21 \[ \int \cot ^6(c+d x) \csc ^3(c+d x) (a+a \sin (c+d x))^2 \, dx=-\frac {7 \, a^{2} {\left (\frac {2 \, {\left (15 \, \cos \left (d x + c\right )^{7} + 73 \, \cos \left (d x + c\right )^{5} - 55 \, \cos \left (d x + c\right )^{3} + 15 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{8} - 4 \, \cos \left (d x + c\right )^{6} + 6 \, \cos \left (d x + c\right )^{4} - 4 \, \cos \left (d x + c\right )^{2} + 1} - 15 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 15 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - 56 \, a^{2} {\left (\frac {2 \, {\left (33 \, \cos \left (d x + c\right )^{5} - 40 \, \cos \left (d x + c\right )^{3} + 15 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{6} - 3 \, \cos \left (d x + c\right )^{4} + 3 \, \cos \left (d x + c\right )^{2} - 1} + 15 \, \log \left (\cos \left (d x + c\right ) + 1\right ) - 15 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} + \frac {1536 \, a^{2}}{\tan \left (d x + c\right )^{7}}}{5376 \, d} \]

input
integrate(cos(d*x+c)^6*csc(d*x+c)^9*(a+a*sin(d*x+c))^2,x, algorithm="maxim 
a")
 
output
-1/5376*(7*a^2*(2*(15*cos(d*x + c)^7 + 73*cos(d*x + c)^5 - 55*cos(d*x + c) 
^3 + 15*cos(d*x + c))/(cos(d*x + c)^8 - 4*cos(d*x + c)^6 + 6*cos(d*x + c)^ 
4 - 4*cos(d*x + c)^2 + 1) - 15*log(cos(d*x + c) + 1) + 15*log(cos(d*x + c) 
 - 1)) - 56*a^2*(2*(33*cos(d*x + c)^5 - 40*cos(d*x + c)^3 + 15*cos(d*x + c 
))/(cos(d*x + c)^6 - 3*cos(d*x + c)^4 + 3*cos(d*x + c)^2 - 1) + 15*log(cos 
(d*x + c) + 1) - 15*log(cos(d*x + c) - 1)) + 1536*a^2/tan(d*x + c)^7)/d
 
3.6.100.8 Giac [A] (verification not implemented)

Time = 0.42 (sec) , antiderivative size = 260, normalized size of antiderivative = 1.43 \[ \int \cot ^6(c+d x) \csc ^3(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {7 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} + 32 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 224 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 280 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 672 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 1792 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 5040 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 1120 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {13698 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} + 1120 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 1792 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 672 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 280 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 224 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 32 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 7 \, a^{2}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8}}}{14336 \, d} \]

input
integrate(cos(d*x+c)^6*csc(d*x+c)^9*(a+a*sin(d*x+c))^2,x, algorithm="giac" 
)
 
output
1/14336*(7*a^2*tan(1/2*d*x + 1/2*c)^8 + 32*a^2*tan(1/2*d*x + 1/2*c)^7 - 22 
4*a^2*tan(1/2*d*x + 1/2*c)^5 - 280*a^2*tan(1/2*d*x + 1/2*c)^4 + 672*a^2*ta 
n(1/2*d*x + 1/2*c)^3 + 1792*a^2*tan(1/2*d*x + 1/2*c)^2 - 5040*a^2*log(abs( 
tan(1/2*d*x + 1/2*c))) - 1120*a^2*tan(1/2*d*x + 1/2*c) + (13698*a^2*tan(1/ 
2*d*x + 1/2*c)^8 + 1120*a^2*tan(1/2*d*x + 1/2*c)^7 - 1792*a^2*tan(1/2*d*x 
+ 1/2*c)^6 - 672*a^2*tan(1/2*d*x + 1/2*c)^5 + 280*a^2*tan(1/2*d*x + 1/2*c) 
^4 + 224*a^2*tan(1/2*d*x + 1/2*c)^3 - 32*a^2*tan(1/2*d*x + 1/2*c) - 7*a^2) 
/tan(1/2*d*x + 1/2*c)^8)/d
 
3.6.100.9 Mupad [B] (verification not implemented)

Time = 13.00 (sec) , antiderivative size = 387, normalized size of antiderivative = 2.13 \[ \int \cot ^6(c+d x) \csc ^3(c+d x) (a+a \sin (c+d x))^2 \, dx=-\frac {a^2\,\left (7\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{16}-7\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{16}-32\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{15}+32\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{15}\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )+224\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{13}+280\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}-672\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}-1792\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+1120\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9-1120\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+1792\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+672\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-280\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-224\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{13}\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+5040\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\right )}{14336\,d\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8} \]

input
int((cos(c + d*x)^6*(a + a*sin(c + d*x))^2)/sin(c + d*x)^9,x)
 
output
-(a^2*(7*cos(c/2 + (d*x)/2)^16 - 7*sin(c/2 + (d*x)/2)^16 - 32*cos(c/2 + (d 
*x)/2)*sin(c/2 + (d*x)/2)^15 + 32*cos(c/2 + (d*x)/2)^15*sin(c/2 + (d*x)/2) 
 + 224*cos(c/2 + (d*x)/2)^3*sin(c/2 + (d*x)/2)^13 + 280*cos(c/2 + (d*x)/2) 
^4*sin(c/2 + (d*x)/2)^12 - 672*cos(c/2 + (d*x)/2)^5*sin(c/2 + (d*x)/2)^11 
- 1792*cos(c/2 + (d*x)/2)^6*sin(c/2 + (d*x)/2)^10 + 1120*cos(c/2 + (d*x)/2 
)^7*sin(c/2 + (d*x)/2)^9 - 1120*cos(c/2 + (d*x)/2)^9*sin(c/2 + (d*x)/2)^7 
+ 1792*cos(c/2 + (d*x)/2)^10*sin(c/2 + (d*x)/2)^6 + 672*cos(c/2 + (d*x)/2) 
^11*sin(c/2 + (d*x)/2)^5 - 280*cos(c/2 + (d*x)/2)^12*sin(c/2 + (d*x)/2)^4 
- 224*cos(c/2 + (d*x)/2)^13*sin(c/2 + (d*x)/2)^3 + 5040*log(sin(c/2 + (d*x 
)/2)/cos(c/2 + (d*x)/2))*cos(c/2 + (d*x)/2)^8*sin(c/2 + (d*x)/2)^8))/(1433 
6*d*cos(c/2 + (d*x)/2)^8*sin(c/2 + (d*x)/2)^8)